<?php
declare(strict_types=1);

namespace app\admin\service;

use app\admin\model\ResourceView as ResourceViewModel;

class ResourceViewService
{
    /**
     * 单社群可查看数
     * @param $where
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function findResourceView($where)
    {
        return ResourceViewModel::findResourceView($where);
    }

    /**
     * 创建社群可查看数
     * @param $data
     * @return ResourceViewModel|\think\Model
     */
    public static function createResourceView($data)
    {
        return ResourceViewModel::createResourceView($data);
    }

    /**
     * 更新社群可查看数
     * @param $data
     * @param $where
     * @return ResourceViewModel
     */
    public static function updateResourceView($data, $where)
    {
        return ResourceViewModel::updateResourceView($data, $where);
    }
}